importClass('rapi.rbase.RDiv'); 
function RRectRegion(bounds,fillcolor,strokecolor){
	this.type="Region";
	this.bounds=bounds;
	this.leftbottom=bounds.leftbottom;
	this.righttop=bounds.righttop;
	this.div=new RDiv(0,0,null,null).get();
	if(this.div.addEventListener){
	    this.svg=document.createElementNS(SVG_URL, "svg");
	    this.svg.setAttribute("version","1.1");
        this.svg.setAttribute("overflow","visible");            
        this.rect=document.createElementNS(SVG_URL,"rect");
        if(fillcolor){
	        this.rect.setAttribute("fill",fillcolor);
	    }else{
	        this.rect.setAttribute("fill","none")
	    }
	    this.rect.setAttribute("fill-opacity",0.3);
	    if(strokecolor){
	        this.rect.setAttribute("stroke",strokecolor);	        
	    }else{
	        this.rect.setAttribute("stroke","#000000");
	    }
	    this.rect.setAttribute("stroke-opacity",0.5);
	    this.rect.setAttribute("stroke-width",1);
	    
	    this.div.appendChild(this.svg);
	    this.svg.appendChild(this.rect);	    
	}else{
	    this.rect=document.createElement("v:rect");
	    this.rect.unselectable='on';
	    this.style=this.rect.style;
    	
	    if(fillcolor){
	        this.rect.fillcolor=fillcolor;
	    }else{
	        this.rect.filled="false";
	    }	
	    this.style.filter='alpha(opacity=30)';
	    this.div.appendChild(this.rect);
	}	
		 
	this.get=function(){
		return this.div;
	}
	
	this.toString=function(){
		return 'RRectRegion';
	}
	
	this.destroy=function(){
	    if(this.div){
	        if(this.div.parentNode){
			    this.div.parentNode.removeChild(this.div);
		    } 
		    this.div=null;
		    if(this.svg){
                this.svg=null;
		    }
		    this.rect=null;
	    }		
		this.toString=function(){return null;};
	}
}